<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>牛仔走路</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        
        @keyframes walk {
            from {
                background-position: -184px 0;
            }
            to {
                background-position: -1472px 0;
            }
        }
        
        @keyframes run {
            from {
                transform: translate(0);
            }
            49% {
                transform: translate(700px);
            }
            50% {
                transform: translate(500px) rotateY(180deg);
            }
            to {
                transform: translate(-290px) rotateY(180deg);
            }
        }
        
        .box {
            margin: 50px;
            width: 205px;
            height: 325px;
            transform-origin: right;
            background: url(./牛仔走路.webp) no-repeat 0 0 / 1472px 325px;
            animation: walk .7s steps(7) infinite, run 4s infinite forwards linear;
            ;
        }
    </style>
</head>

<body>

    <div class="box"></div>


</body>

</html>